
	<div id="kategorie">


	<?php
		foreach($this->kategorie as $i=>$kategoria){	
	?>
				<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$kategoria['id']; ?>"
		<?php
			if($kategoria['id'] == $this->kat_id)
				echo ' class="active"';
		?>
			><?php echo $kategoria['nazwa']; ?></a>
	<?php
		}
	?>
		</div>
		
	<?php
		if(is_array($this->produkty)){
	?>
				<div class="stronicowanie">
			
		<?php
				if($this->stron > $this->start_pages+$this->max_pages){
					if($this->start_pages > 0){
		?>
						<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$this->start_pages-1; ?>.">&laquo;</a>
			<?php
					}
					for($i=$this->start_pages; $i<$this->start_pages-$this->max_pages; $i++){
						if($i == $this->strona){
			?>
							<span class="page"><?php echo $i+1; ?></span>
			<?php
						}else{
			?>
							<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$i; ?>"><?php echo $i+1; ?></a>
			<?php
						}
					}
					if($this->start_pages+$this->max_pages < $this->stron){
			?>
						<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$this->start_pages+$this->max_pages; ?>">&raquo;</a>
			<?php
					}
				}else{
					
					if($this->start_pages > 0){
			?>
						<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$this->start_pages-1; ?>">&laquo;</a>
			<?php
					}
					for($i=$this->start_pages; $i<$this->stron; $i++){
						if($i == $this->strona){
			?>
							<span class="page"><?php echo $i+1; ?></span>
			<?php
						}else{
			?>
							<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$i; ?>"><?php echo $i+1; ?></a>
			<?php
						}
					}
					if ($this->start_pages+$this->max_pages < $this->stron){
			?>
						<a href="<?php echo $this->siteurl.'index/index/kategoria/'.$this->kat_id.'/strona/'.$this->start_pages+$this->max_pages; ?>">&raquo;</a>
			<?php
					}
				}
			?>
				
				</div>
			
			
			
			
				<div id="prods">
			<?php
				foreach($this->produkty as $i=>$produkt){
			?>
					<div class="kat-prod">
						<a href="#" class="help_<?php echo $produkt['id']; ?> ask">
			<?php
						if($produkt['zdjecie'] == ''){
			?>
							<img src="<?php echo $this->exturl.'gfx/brak_foty.jpg'; ?>" alt="brak zdjęcia" />
			<?php
						}else{
			?>
							<img src="<?php echo $this->exturl.'thumb/'.$produkt['zdjecie']; ?>" alt="<?php echo $produkt['foto_nazwa']; ?>"/>
			<?php
						}
			?>
						</a>
						<a href="#" class="help_<?php echo $produkt['id']; ?> ask nazwa"><?php echo $produkt['producent'].' '.$produkt['nazwa'].' '.$produkt['podnazwa']; ?></a>
						
			<?php
						if($produkt['cena_promocja'] != 0){
			?>
						<span class="cena-old"><?php echo $produkt['cena']; ?></span> <span class="cena"><?php echo $produkt['cena_promocja']; ?>zł</span> 
			<?php
						}else{
			?>
						<span class="cena"><?php echo $produkt['cena']; ?>zł </span>
						
			<?php
						}
			
						if($produkt['rabatArr'] != ''){
			?>
							<span class="cena" style="text-align:left; width:100%;"><?php echo $this->translate->_('Rabat').' '.$produkt['rabatArr'][1]; ?>% </span><br/>
							<span class="small" style="text-align:left; width:100%;">(<?php echo $this->translate->_('przy_zamowieniu_min').' '.$produkt['rabatArr'][0].' '.$this->translate->_('szt'); ?>)</span>
			<?php
						}
			?>
					</div>
					
			<?php
					if($i % 3 == 2){
			?>
					<hr/>
			<?php
					}
				}
			?>	
			
				</div>
				
				<div id="helper">
					{*tutaj ładowane ajaksem info o obrazie*}
				</div>
				
				<div id="fb-root"></div>
				<script src="https://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
				<script type="text/javascript">
				FB.init({
				appId : '274202909338399',
				});
				</script>
	<?php
		}else{	
				echo '<p>'.$this->translate->_('brak_ofert').'</p>';
		}
	?>
	